/*class A {
    String name;

    void shout() {
        System.out.println("动物发出叫声");
    }
}

class Dog extends A {
    void shout() {
        super.shout();
        System.out.println("狗发出了叫声");
    }
}

public class JavaEx105 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        dog.name = "哈士奇";
        dog.shout();
    }

}*/
/*class Animal {
    public Animal(String name) {
        System.out.println("我是一只" + name);
    }
}

class Dog extends Animal {
    public Dog() {
        super("可爱的小白兔");
    }
}

public class JavaEx105 {
    public static void main(String[] args) {
        Dog dog = new Dog();
    }
}*/